import React from 'react'
import ReactDOM from 'react-dom'    
import Search from '../../component/Search/Search' 
import './css/LnstantMesList.css' 
import man from './assets/LnstantMesList/man.png'

class LnstantMesList extends React.Component {
    constructor(props) {
        super(props);
        this.state = { 
            legend : false , 
        };
    }
  

    componentWillMount = () => {  } 
    componentDidMount = () => { 
  
    }  
  
    resume = ()=>{ 
        
    }


     searchFor=(data)=>{ //搜索触发事件
        this.getData('s_message_list_hy',{title:data}) 
     }
    
     searchConfig = {
        main:{
            width: '80%',
            tplType : 'file', 
            background : '#fff',
            height:'40px',
            lineHeight:'40px',
        },
        img:{
            key:'./assets/List/Search_icon.png',
            style:{
                display: 'inline-block',
                width: '8%',
                'margin-right': '5%',
                'vertical-align': 'middle',
            }
        },
        rightImg   : {//右边图标
            key:'./assets/List/investigate.png',
            style:{
                width: '19%',
                display: 'inline-block',
                verticalAlign: 'top',
                height: '30px',
                float: 'right',
            }
        }, 
        searchCon:{
            style:{
                width:'57%',
                border:'none',
                outline: 'none',
                display: 'inline-block',
                'vertical-align': 'middle',
            }, 
        },
        rightBtn:{
            txt:'./assets/add.png',
            type:'img',  
            style:{       width: '16%',   height: '40px', display: 'inline-block',  verticalAlign: 'middle',marginLeft:'5px' ,marginTop:'5px'}
        }, 
    }

      config = {
        wrapperHeight: document.documentElement.clientHeight - 40, // 容器高度
        duration: 0.5, // 弹回时间
        sensibility: 2, // 灵敏度
    }
    
  
    searchData=[  { } ]

    render() {
        return (
            <div  className="LnstantMesList">
                <div className='searchWrap'> 
                    <Search  searchFor={(data)=>this.searchFor(data)} itemClick ={(data=>this.addBtn(data))}  config = {this.searchConfig} data={this.searchData}  ></Search>
                </div>
                 
            </div>
        )
    }
} 
export default LnstantMesList 